package com.github.kotvertolet.youtubejextractor.models.newModels;

import com.github.kotvertolet.youtubejextractor.models.youtube.videoData.ThumbnailsItem;
import com.google.gson.annotations.SerializedName;
import ohos.utils.Parcel;
import ohos.utils.Sequenceable;

import java.io.Serializable;
import java.util.List;

public class Watermark implements Sequenceable, Serializable {

    @SerializedName("thumbnails")
    private List<ThumbnailsItem> thumbnails;

    public static final Sequenceable.Producer<Watermark> CREATOR = new Producer<Watermark>() {
        @Override
        public Watermark createFromParcel(Parcel parcel) {
            // Initialize an instance first, then do customized unmarshlling.
            Watermark watermark = new Watermark();
            watermark.unmarshalling(parcel);
            return watermark;
        }
    };

    @Override
    public boolean marshalling(Parcel parcel) {
        parcel.writeList(this.thumbnails);
        return true;
    }

    @Override
    public boolean unmarshalling(Parcel parcel) {
        this.thumbnails = parcel.readSequenceableList(ThumbnailsItem.class);
        return true;
    }

    public List<ThumbnailsItem> getThumbnails() {
        return thumbnails;
    }

    public void setThumbnails(List<ThumbnailsItem> thumbnails) {
        this.thumbnails = thumbnails;
    }

    @Override
    public String toString() {
        return "Watermark{" +
                "thumbnails=" + thumbnails +
                '}';
    }
}
